package parsers;

import java.io.File;
import java.io.IOException;

import org.jdom.Element;
import org.jdom.Document;
import org.jdom.JDOMException;
import org.jdom.input.SAXBuilder;


public class Parser
{
	protected Element root = null;
	protected String xpathQuery ;
	protected Document xmlDoc;
	protected SAXBuilder builder;
	protected File file;
	
	protected Document getXMLDoc(String filePath)
	{
		builder = new SAXBuilder();
		file = new File(filePath);
		try
		{
			xmlDoc = builder.build(file);
		}
		catch (JDOMException e)
		{
			e.printStackTrace();
		}
		catch (IOException e)
		{
			e.printStackTrace();
		}
		return xmlDoc;
	}
}
